/*
 * @Author: 李天惊 uf_lee@163.com
 * @Date: 2025-03-07 15:17:11
 * @LastEditors: 李天惊 uf_lee@163.com
 * @LastEditTime: 2025-03-10 12:43:38
 * @FilePath: \global-brain\global-brain-admin\src\api\sys\config\index.ts
 * Copyright (c) 2025 by ${git_name_email}, All Rights Reserved.
 */
import { useAxios } from '@/hooks/web/useAxios'
const request = useAxios()

import { useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache()

// 系统-配置-列表
export const sysConfigListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'sysConfigList',
      data: data
    }
  })
}

// 系统-配置-新增
export const sysConfigAddApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'sysConfigAdd',
      data: data
    }
  })
}

// 系统-配置-修改
export const sysConfigEditApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'sysConfigEdit',
      data: data
    }
  })
}

// 系统-配置-删除
export const sysConfigDelApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'sysConfigDel',
      data: data
    }
  })
}

// 系统-配置-批量删除
export const sysConfigBatchDelApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'sysConfigBatchDel',
      data: data
    }
  })
}

// 系统-配置-代码查看
export const sysConfigCodeSeeApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'sysConfigCodeSee',
      data: data
    }
  })
}
